<template>
    <div>
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <!-- <td><input type="checkbox" v-model="checked" @click="checkAll" /></td> -->
                    <td>id</td>
                    <td>头像</td>
                    <td>姓名</td>
                    <td>类型</td>
                    <td>性别</td>3
                    <td>身份证</td>
                    <td>手机号</td>
                    <td>籍贯</td>
                    <td>民族</td>
                    <td>小区</td>
                    <td>房间号</td>
                    <td>审核状态</td>
                    <td>添加时间</td>
                    <td>操作</td>
                </tr>
                <tr v-for="item in data.list" :key="item.id">
                    <td></td>
                    <td>{{ item.id }}</td>
                    <td>
                        <img :src="item.photo" width="100" height="100">
                    </td>
                    <td>{{ item.name }}</td>
                    <td>{{ item.lie }}</td>
                    <td>{{ item.sex }}</td>
                    <td>{{ item.card }}</td>
                    <td>{{ item.phone }}</td>
                    <td>{{ item.jiGuan }}</td>
                    <td>{{ item.ming }}</td>
                    <td>{{ item.qu }}</td>
                    <td>{{ item.fang }}</td>
                    <td>{{ item.state }}</td>
                    <td>{{ item.createTime }}</td>
                    <td>操作</td>
                </tr>
            </tbody>
        </table>
        <!-- <div>
      <span>总共{{ data.totalCount }}条</span>
      <span>总共{{ data.totalPage }}页</span>
      <span>{{ quinfor.pageIndex }} / {{ data.totalPage }}</span>

      <input type="button" value="首页" @click="goPage(1)" />
      <input
        type="button"
        value="上一页"
        @click="goPage(quinfor.pageIndex - 1)"
      />
      <input
        type="button"
        value="下一页"
        @click="goPage(quinfor.pageIndex + 1)"
      />
      <input type="button" value="尾页" @click="goPage(data.totaPage)" />

      <span v-for="item in data.totaPage" @click="goPage(item)">{{
        item
      }}</span>

      <input type="number" v-model="quinfor.pageIndex" />
      <input type="button" value="跳转" @click="goPage(quinfor.pageIndex)" />

      <select v-model="quinfor.pageSize" @change="show">
        <option :value="item" v-for="item in arr" :key="item">
          每页显示{{ item }}条
        </option>
      </select>
    </div> -->
    </div>
</template>

<script setup lang="ts">
import { onMounted, reactive, ref } from 'vue';
import axios from 'axios';
import { useRouter } from 'vue-router';
let quinfor=reactive({

    qu:'',
    name:'',
    phone:'',
    fang:'',
    lei:'',
    pageIndex: 1,
    pageSize: 2,
});
let data: any = reactive({
    list: [],
    totaCount: 0,
    totaPage: 0,
});

onMounted(() => {
  show();
});
const show=()=>{
    axios({
        url:'https://localhost:7107/api/JunMing/Show',
        method:'get',
        params:quinfor,
    })
    .then((res)=>{
        console.log(res);
        data.list=res.data.list;
        data.totaCount=res.data.totaCount;
        data.totaPage=res.data.totaPage;
    })
    .catch((err)=>{
        console.log(err);
    })
}
var l=6;
</script>

<style scoped>

</style>